package com.example.demo.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.example.demo.mapper.DemoMapper;
import com.example.entity.Users;

@Service
public class DemoService {
	@Autowired
	private DemoMapper demoMapper;
	
	public List<Users> likeName(String name){
		//第一个参数第几页，第二个获取的条数
		List<Users> list = demoMapper.likeName(name);
		return list;
	}
	
	public Users getById(long id) {
		return demoMapper.getById(id);
	}
}
